<template>
  <div>
    <el-carousel indicator-position="outside">
      <el-carousel-item v-for="(img, index) in imgList" :key="index">
        <img :src="img.img" />
        <h3 text="2xl" justify="center">{{ item }}</h3>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
import { getImg } from '@/api/shop'
export default {
  data() {
    return {
      imgList: [],
    }
  },
  async mounted() {
    const res = await getImg()
    this.imgList = res.data
    console.log(this.imgList)
  },
}
</script>

<style lang="scss" scoped>
</style>